1. Field of the Invention
The present invention relates to an image recognizing device.
2. Description of the Related Art
With the popularization of personal computers and the arrangements of networks, the number of electronic documents has been growing in recent years. However, the main medium of information distribution is still a paper document, and an enormous number of paper documents currently exist. Accordingly, a document image recognizing device intended to convert a paper document into an electronic document, and to edit a conversion result has been increasingly demanded. The document image recognizing device is a device which uses a document image as an input, and performs a coding process by recognizing characters, etc. included in the document image. Currently, there are products which use a binary document image as an input. The binary document image is a document image where image data of a character is represented, for example, by xe2x80x9c1xe2x80x9d, while the image data of the background is represented by xe2x80x9c0xe2x80x9d.
Recently, an image filing device has become popular, and also the demand for inputting an image filed by the image filing device to a document image recognizing device, and for recognizing the image has been increasing. Especially, the number of gray-scale or color documents including photographs has been growing. Therefore, the demand for recognizing not only binary documents but also gray-scale or color documents has been on the rise.
A color document image recognizing device recognizes also a color or gray-scale document image. A conventional color document image recognizing device obtains a binary image by binarizing each brightness component with a predetermined threshold value, and recognizes the obtained binary image, if an input document image is not a binary image but a gray-scale or color image.
FIGS. 1A and 1B respectively show the configuration of the conventional color document image recognizing device and an extended color text image.
In FIG. 1A, a document image inputting unit 170 is a unit for inputting a document image, and is typically implemented as a scanner, etc. For a color document, parameters such as a color parameter, a brightness parameter, etc. are assigned to respective pixels by illuminating the document, receiving a reflected light, and analyzing the received light. If the document to be scanned is a gray-scale document, the light reflected from the document is analyzed, the information about the level of brightness is obtained, and this information is assigned to each pixel. At this time, all of the pixels of the gray-scale document are detected to be black-and-white, which is set as the color parameters of each of the pixels.
If an input image is a color image, a brightness image extracting unit 171 extracts a brightness component for each pixel, and outputs a brightness image which is a gray-scale image to a predetermined threshold value binarizing unit. If the input image is a gray-scale image, the color parameters of all of the pixels are set to be black-and-white. Therefore, the gray-scale image resultant from the process of the brightness image extracting unit 171 will become the image data having the same brightness data as that of the input gray-scale image, in principle. This is because only the parameters related to the hue are removed from all the color parameters of the processed gray-scale image.
If a gray-scale image which is a brightness image is input, a predetermined threshold value binarizing unit 172 obtains a binary image by binarizing the gray-scale image with a predetermined threshold value. This threshold value is a value which is externally determined and input. Hereinafter, a gray-scale image fundamentally indicates not the gray-scale image with color parameters set to black-and-white, which is scanned by the document image inputting unit 170, but the brightness image resultant from the process performed by the brightness image extracting unit 171. That is, the gray-scale image is defined to have not color but brightness parameters. Even if the gray-scale image has color parameters, only brightness parameters are substantially valid for recognizing the image if the color parameters are set to black-and-white for all of the pixels. Accordingly, image recognition can be made also by using such a gray-scale image.
A binary image recognizing unit 173 recognizes a binary image. That is, this unit recognizes characters by obtaining the features of the document image which is binarized by the predetermined threshold value binarizing unit 172, and replaces the characters with the codes which are internally used by a computer and correspond to the recognized characters.
A recognition result outputting unit 174 outputs the result of the character recognition made by the binary image recognizing unit 173, that is, the file which is restructured into a code sequence representing the characters of a document image.
The conventional color document image recognizing device has a disadvantage that recognition accuracy is low.
Since the amount of data of each pixel of a color document image is 8 times that of a binary image, the color document image is input to a color document image recognizing device at a resolution lower than that of the binary image in order to reduce an amount of processing time of an image input device such as a scanner, etc., and a capacity of a memory used for filing an image, etc.
FIG. 1B illustrates an expanded low-resolution color text image.
This figure shows a monochromatic image of a 150-dpi text image in full color. With a color display, many colors can be identified on the periphery of the characters, and it seems difficult to identify an area by extracting the same color.
The conventional document image recognizing device is fundamentally designed to have an input of a binary image with a small amount of data, and assumes the document image of a standard resolution of approximately 400 dpi. Accordingly, if a color document image of 150 or less dpi is input, the conventional device converts the document image into a binary image with the resolution equal to or less than 150 dpi, and recognizes the converted image. Therefore, the device cannot recognize the image with sufficient accuracy.
An object of the present invention is to provide a high-speed document image recognizing device which implements high recognition accuracy.
An image recognizing device according to the present invention comprises: an image converting unit for converting an input document image into a gray-scale image if the input document image is a color image, and for newly outputting a gray-scale image if the input document image is a gray-scale image; a variable resolution binarizing unit for converting the gray-scale image into a binary image with a higher resolution according to the resolution of the gray-scale image; and a unit for recognizing the binarized image.
An image recognizing method according to the present invention comprises the steps of: (a) converting an input document image into a gray-scale image if the input document image is a color image, and for newly outputting a gray-scale image if the input document image is a gray-scale image; (b) converting the gray-scale image into a binary image with a higher resolution according to the resolution of the gray-scale image; and (c) recognizing the binarized image.
According to the present invention, a gray-scale image obtained by converting a color document image or an input gray-scale image is converted into the image data having a suitably higher resolution according to the resolution of the gray-scale image, thereby binarizing the image without losing the information about brightness levels of a gray scale. Therefore, characters appearing in a binary image can be prevented from being defaced, thereby implementing character recognition with higher accuracy.
Furthermore, a drawing area including characters, etc. is roughly extracted from a document image, and a binarization process according to the present invention is performed only for the extracted area, thereby improving the processing speed.